/**
 * 绑定键盘事件.
 * 
 * @exports KeyPress_* 各按键 Press 监听结果.
 */
export default {
  start: function (self, ctx) {
    document.addEventListener('keydown', e => {
      const attr = `KeyPress_${e.code}`;
      const value = (self.getParameter(attr) || 0) + 1;
      self.setParameter(attr, value);
    });
  }
}